<!DOCTYPE html>
<html lang="en" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="stylesheet" href="/css/custom.form.css">
    <link rel="stylesheet" href="/css/sysgoods/album.css">
    <link rel="stylesheet" href="/css/iconfont.css">
    <style>
        .hidden{
            visibility: hidden;
        }
    </style>
</head>
<body>
<div class="panel panel-default operation">
    <div class="panel-heading title"></div>
    <div class="layui-card-body">
        <form class="layui-form " action="" lay-filter="info" style="width: 700px;margin-top: 10px">
            <input name="id" hidden/>
            <input type="type" name="type" placeholder="请输入商品类型" hidden />
            <input type="coverImg" name="coverImg" placeholder="请输入封面图片" hidden />
            <input type="storeId" name="storeId" placeholder="请输入门店id" hidden />

            <div class="layui-form-item">
                <label class="layui-form-label">商品名称</label>
                <div class="layui-input-block">
                    <input type="goodsName" name="goodsName" placeholder="请输入商品名称" autocomplete="off"
                           class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">封面图片</label>
                <div class="layui-input-block">
                    <!-- 点击图片触发上传 -->
                    <img class="" id="coverImg" src="/images/商品发布-点击上传icon.png" width="150" height="150" style="cursor:pointer;"/>
                    <p id="coverImg-msg">

                    </p>
                    <!--<img class=" layui-icon layui-icon-add-1" src="/images/chickUpload.png" width="300" height="140"/>-->
                    <!--<i class="layui-icon layui-icon-add-1"></i>-->
                    <!--<img class="layui-icon-addition" width="600" height="280"  />-->
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">
                    商品相册
                    <br/>
                    <span class="albumNumber"></span>
                </label>
                <div class="layui-input-block">
                    <div class="albumAddBtn">
                    </div>
                    <div class="albumBox layui-row ">
                    </div>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">商品价格<br/>单位元</label>
                <div class="layui-input-block">
                    <input type="money" name="money" placeholder="请输入商品价格 单位元" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">简介</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea" type="description" name="description" placeholder="请输入简介" ></textarea>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">商品类型</label>
                <div class="layui-input-block">
                    <input type="type" name="type" placeholder="请输入" hidden />
                    <input type="typeName" name="typeName" placeholder="请选择商品类型" autocomplete="off" class="layui-input" readonly="readonly" style="background:#eeeeee!important">
                    <!-- 弹出树，选择商品类型 -->
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">商品描述</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea" id="content" type="content" name="content" ></textarea>
                    <!--<div id="editor">-->
                        <!--<p>This is some sample content.</p>-->
                    <!--</div>-->
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="submit">保存</button>
                    <button class="layui-btn layui-btn-primary" id="btn_cancel">返回</button>
                </div>
            </div>
        </form>
    </div>
</div>

<div class="table_div" hidden>
    <div id="searchParam" shiro:hasPermission="sysGoods:list">
        <div class="layui-form-item">
            <div class="layui-input-inline">
                <input type="text" id="key" class="layui-input" autocomplete="off" placeholder="请输入" value="0.00"/>
            </div>

            <div class="layui-input-inline ">
                <button class="layui-btn" onclick="search()" id="search">查询</button>
                <button class="layui-btn" id="export">导出全部</button>
            </div>
        </div>

    </div>
    <table class="layui-table" id="showTable" lay-filter="showTable"></table>
</div>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="add" shiro:hasPermission="sysGoods:add">添加</button>
        <button class="layui-btn layui-btn-sm" lay-event="batchDeleted" shiro:hasPermission="sysGoods:delete">删除
        </button>
    </div>
</script>
<script type="text/html" id="tool">
    <a class="layui-btn layui-btn-xs" lay-event="edit" shiro:hasPermission="sysGoods:update">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" shiro:hasPermission="sysGoods:delete">删除</a>
</script>

<div id="menuTree" style="display: none"></div>
</body>
</html>
<!--<script src="https://cdn.ckeditor.com/ckeditor5/21.0.0/classic/ckeditor.js"></script>-->
<script src="/layui/layui.all.js"></script>
<script src="/js/core.util.js"></script>
<script src="/js/sysgoods/list.js"></script>